package com.xh.model.request;

import cn.hutool.json.JSONUtil;
import lombok.*;

@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PosterSaveRequest {

    private long _t;

    private Long id;

    private String json;

    private String name;

    private int quality;

    public PreviewRequest convert() {
        PreviewRequest request = JSONUtil.toBean(this.getJson(), PreviewRequest.class);
        request.setId(this.getId());
        return request;
    }

}
